﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using TCKQKL.Service.DataContract;

namespace TCKQKL.Service.Contract
{
    [ServiceContract]
    public interface ILookupService
    {
        [OperationContract]
        DateTime getTradingDate();
        [OperationContract]
        void PrintMessage(string message);
        [OperationContract]
        InvestorDataModel loginProcess(string accountNo, string password);
        [OperationContract]
        void logout(string accountNo);
        [OperationContract]
        InvestorDataModel getAccountData(string accountNo);
        [OperationContract]
        List<InvestorDataModel> getAssignInvestorData(decimal investorID);
        [OperationContract]
        List<InvestorDataModel> getAssignInvestorDataByName(decimal investorID);
        [OperationContract]
        InvestorDataProfileModel getAccountProfileData(decimal investorID);
        [OperationContract]
        List<OrdersBoscModel> getOrders(decimal investorID);
        [OperationContract]
        List<OrdersBoscModel> getOrdersWaiting(decimal investorID);
        [OperationContract]
        List<OrdersBoscModel> getOrdersTopN(decimal investorID, int topN);
        [OperationContract]
        List<OrdersBoscModel> getOrdersHistory(decimal investorID, DateTime start, DateTime end);
        [OperationContract]
        List<OrdersBoscModel> getOrdersHistoryDetail(decimal investorID, DateTime fromDate, DateTime toDate, string orderType, string orderClass, string orderSide, string symbol, string ID, decimal priceLow, decimal priceHigh, decimal qttyLow, decimal qttyHigh);
        [OperationContract]
        List<AccountDataModel> getAccountByInvestorID(decimal investorID);
        [OperationContract]
        List<BankDataModel> getBankByInvestorID(decimal investorID);
        [OperationContract]
        decimal getNettingAmountByInvestorId(decimal investorID);
        [OperationContract]
        BankDataModel getBankDataByDate(decimal investorID, DateTime selected);
        [OperationContract]
        List<TransDataModel> getTransByInvestorId(decimal investorId, DateTime fromDate, DateTime toDate);
        [OperationContract]
        decimal getRemain(decimal investorID, DateTime selected);
        
        [OperationContract]
        List<MatchedResultModel> getMatchedResult(decimal investorID);
        [OperationContract]
        List<MatchedResultModel> getMatchedResultHistory(decimal investorID, DateTime start, DateTime end);


        [OperationContract]
        List<OrdersBoscModel> getOrdersRelatedByOrderId(string originOrderID);
        [OperationContract]
        List<OrdersBoscModel> getOrdersRelatedHistoryByOrderId(string originOrderID);
        [OperationContract]
        List<MatchedResultModel> getMatchedResultByOrderID(string orderID);
        [OperationContract]
        List<MatchedResultModel> getMatchedResultTopN(decimal investorID, int topN);
        [OperationContract]
        List<MatchedResultModel> getMatchedResultEarlyByAccountNo(string orderID);
        [OperationContract]
        List<MatchedResultModel> getMatchedResultByInvestorId(decimal investorID);

        [OperationContract]
        MarketSummaryDataModel getMarketSummary(string marketName);
        [OperationContract]
        StocksDataModel getQuote(string symbol);

        [OperationContract]
        int PlaceOrder(OrdersOnlineModel order);
        [OperationContract]
        int ChangeOrder(OrdersOnlineModel original, OrdersOnlineModel changed);
        [OperationContract]
        int CancelOrder(OrdersOnlineModel original);
        [OperationContract]
        StocksDataModel GetStockInfo(string Symbol);


        [OperationContract]
        List<OrdersOnlineModel> getOrderListByStatus(string Status);
        [OperationContract]
        List<OrdersOnlineModel> getOrderListByStatusAndAccountNo(string Status, string AccountNo);
        [OperationContract]
        OrdersOnlineModel getOrderOriginal(int OrderId);
        [OperationContract]
        OrdersOnlineModel getNewestOrder(string OrgStatus, string StatusAfter);
        [OperationContract]
        OrdersOnlineModel GetOrderByOrderId(int OrderPlaceId);
        [OperationContract]
        int UpdateOrderStatus(int OrderPlaceId, string Status);
        [OperationContract]
        List<OrdersOnlineModel> getOnlineOrdersDetail(string AccountNo, string OrderSide, string Symbol, string OrderSpec, string OrderClass, string OrderMode, DateTime TimeStamp, string Price, string OrderType, string OrderNo, int Quantity);
        [OperationContract]
        List<DateTime> getBackDate();
        [OperationContract]
        decimal getPreLoanByInvestor(decimal investorid);
        [OperationContract]
        List<AccountDataModel> getStockNettingInvestorId(decimal investorID, DateTime transdate);

    }
}
